package v1

import (
	"gf-admin-api-template/internal/model"
	"github.com/gogf/gf/v2/frame/g"
)

type LoginReq struct {
	g.Meta   `path:"/auth/login" tags:"Auth" method:"post" summary:"登入"`
	Account  string `json:"account" v:"required#用户名不能为空|length:5,20"`
	Password string `json:"password" v:"required#密码不能为空|length:5,20"`
}
type LoginRes struct {
	Token string `json:"token"`
}

type LogoutReq struct {
	g.Meta `path:"/auth/logout" tags:"Auth" method:"post" summary:"登出"`
}
type LogoutRes struct {
	EmptyRes
}

type UserProfileReq struct {
	g.Meta `path:"/auth/getUserInfo" tags:"Auth" method:"get" summary:"用户基础信息"`
}
type UserProfileRes struct {
	UserInfo *model.UserInfo       `json:"userInfo"`
	Menus    []*model.MenuTreeItem `json:"menus"`
}
